package com.dslcode.cloud.provider.order;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.cloud.sleuth.sampler.AlwaysSampler;
import org.springframework.context.annotation.Bean;

//@SpringBootApplication
@MapperScan("com.dslcode.cloud.provider.order.mapper")
//@EnableDiscoveryClient
@EnableFeignClients
//@EnableCircuitBreaker// 开启Hystrix断路器
@SpringCloudApplication// 等同于 @SpringBootApplication  @EnableDiscoveryClient  @EnableCircuitBreaker
public class ProviderOrderApplication {

	public static void main(String[] args) {
		SpringApplication.run(ProviderOrderApplication.class, args);
	}

	@Bean
	public AlwaysSampler defaultSampler(){
		return new AlwaysSampler();
	}
}
